/**
 * Created with IntelliJ IDEA.
 * User: 卞京帅{bjslogin@gmail.com}
 * Date: 12-11-25
 * Time: 下午2:06
 * To change this template use File | Settings | File Templates.
 */
Ext.define('Airways.view.system.operationlog.OperationLogView' ,{
    extend: 'Ext.grid.Panel',
    alias : 'widget.operationLogView',
    layout:'fit',
    autoScroll:true,
    height:'100%',
    store:Ext.create('Airways.store.system.operationlog.OperationLogStore'),
    initComponent: function() {
        this.dockedItems = this.buildDockedItems();
        this.bbar = this.buildBbar();
        this.columns = this.buildColumns();
        this.callParent(arguments);
    },
    buildDockedItems:function(){
        return [{
            dock: 'top',
            xtype: 'toolbar',
            items:['-',{
                xtype:'textfield',
                labelWidth:80,
                width:200,
                name:'moduleName',
                fieldLabel:'操作模块名称'
            },'-',{
                xtype:'textfield',
                labelWidth:80,
                width:200,
                name:'opTypeName',
                fieldLabel:'操作类型名称'
            },'-',{
                xtype:'button',
                iconCls:'find',
                text:'查询',
                disable:true,
                action:'select'
            },'-']
        }];
    },
    buildBbar:function(){
        return Ext.create('Ext.PagingToolbar', {
            store:this.store,
            displayInfo: true
        });
    },
    buildColumns:function(){
        return [
            Ext.create('Ext.grid.RowNumberer'),
            {text: "模块名称",dataIndex:'moduleName',sortable: true,width:70},
            {text: "操作类型",dataIndex:'opType',sortable: true,width:70},
            {text: "类型名称",dataIndex:'opTypeName',sortable: true,width:70},
            {text: "操作内容",dataIndex:'opContent',sortable: true,width:150},
            {text: "操作参数",dataIndex:'opParam',sortable: true,width:150},
            {text: "操作类",dataIndex:'opClass',sortable: true,width:150},
            {text: "操作方法",dataIndex:'opMethod',sortable: true,width:70},
            {text: "操作IP",dataIndex:'opIp',sortable: true,flex:1}
        ];
    }
})